import base64
s = 'ippr_z2C$qAzdH3FAzdH3Ft42f6v_z&e3Bkwt17_z&e3Bv54AzdH3Ft4w2jAzdH3Fva%nDfit37j8%dCa%dCa%dCdl9%dC9aAzdH3Fft2g=u9auv1anu0uwwuc8lajjbluvj9n1ujlkAzdH3Fud1jk9bubvc9l9jjvwakmwnvd0ucjaujlldc0jj1_z&e3B3r2'
# a = base64.b64decode(s.encode('utf-8'))
imgdata=base64.b64decode(s.encode('utf-8'))
file=open('2.jpg','wb')
file.write(imgdata)
file.close()